class Student(object):
    count = 0
    def __init__(self, name):
        self.name = name
        # 每次都会调用
        self.count_numers()
    # 自增计数代码
    def count_numers(self):
        Student.count += 1

# 测试代码
# if __name__ == '__main__':
#     print(Student.count)
#     A = Student('a')
#     print(Student.count)
#     B = Student('b')
#     print(Student.count)
#     C = Student('c')
#     print(Student.count)